package com.cugmarket.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cugmarket.entity.ChatMessage;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface ChatMessageMapper extends BaseMapper<ChatMessage> {
    // 根据聊天列表ID删除所有相关的聊天消息
    @Delete("DELETE FROM chat_message WHERE chat_list_id = #{chatListId}")
    int deleteByChatListId(String chatListId);
}
